<!DOCTYPE html>



  


<html class="theme-next pisces use-motion" lang="">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/blog/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/blog/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/blog/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/blog/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/blog/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/blog/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/blog/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="Hexo, NexT" />










<meta name="description" content="一、  框架: 系统或者第三方事先写好的写很牛X功能的类，把这些类交给我们使用，这些类的集合就叫框架. Foundation框架: 是一个包，有很多类和函数，定义了一些数据类型.这个框架中的类都是一些最基础的类.其他的框架都是基于Foundation框架的.  UIKit. AVFoundation. ……">
<meta name="keywords" content="Android、iOS、Web、React Native">
<meta property="og:type" content="article">
<meta property="og:title" content="Objective-C-学习第九天">
<meta property="og:url" content="http://yoursite.com/blog/2018/08/06/Object-C/Objective-C-学习第九天/index.html">
<meta property="og:site_name" content="凌浩雨_博客">
<meta property="og:description" content="一、  框架: 系统或者第三方事先写好的写很牛X功能的类，把这些类交给我们使用，这些类的集合就叫框架. Foundation框架: 是一个包，有很多类和函数，定义了一些数据类型.这个框架中的类都是一些最基础的类.其他的框架都是基于Foundation框架的.  UIKit. AVFoundation. ……">
<meta property="og:locale" content="default">
<meta property="og:updated_time" content="2018-08-06T10:34:04.001Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Objective-C-学习第九天">
<meta name="twitter:description" content="一、  框架: 系统或者第三方事先写好的写很牛X功能的类，把这些类交给我们使用，这些类的集合就叫框架. Foundation框架: 是一个包，有很多类和函数，定义了一些数据类型.这个框架中的类都是一些最基础的类.其他的框架都是基于Foundation框架的.  UIKit. AVFoundation. ……">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/blog/',
    scheme: 'Pisces',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: 'Author'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/blog/2018/08/06/Object-C/Objective-C-学习第九天/"/>





  <title>Objective-C-学习第九天 | 凌浩雨_博客</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="default">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/blog/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">凌浩雨_博客</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/blog/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            Home
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/blog/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            Archives
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/blog/blog/2018/08/06/Object-C/Objective-C-学习第九天/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="凌浩雨">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/images/avatar.jpeg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="凌浩雨_博客">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">Objective-C-学习第九天</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Posted on</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2018-08-06T18:01:39+08:00">
                2018-08-06
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>一、</p>
<ol>
<li><p>框架: 系统或者第三方事先写好的写很牛X功能的类，把这些类交给我们使用，这些类的集合就叫框架.<br> Foundation框架: 是一个包，有很多类和函数，定义了一些数据类型.这个框架中的类都是一些最基础的类.其他的框架都是基于Foundation框架的.</p>
<p> UIKit.<br> AVFoundation.<br> ……</p>
</li>
</ol>
<a id="more"></a>
<ol start="2">
<li><p>NSString<br> 1). NSString是一个数据类型，保存OC字符串.</p>
<pre><code>NSString的本质是一个类.
最标准的创建NSString对象的方法:
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">NSString *str1 = [NSString new];</span><br><span class="line">NSString *str2 = [[NSString alloc] init];</span><br><span class="line">NSString *str3 = [NSString string];</span><br></pre></td></tr></table></figure>

使用这种方式创建的字符串是一个空的字符. @&quot;&quot;
NSString 对象是用来存储字符串的.
</code></pre><p> 2). NSString是OC中最常用的一个类，所以OC提供了一种更为快速的创建字符串对象的方式.</p>
<pre><code>使用前缀@
@&quot;jack&quot;: 本质是一个NSString对象，存储的是&quot;jack&quot;这个字符串
NSString *str1 = @&quot;rose&quot;;
a. @&quot;rose&quot;本质是一个NSString对象，存储的是字符串&quot;rose&quot;
b. 将这个字符串对象的地址返回赋值给str1指针
格式控制符%p: 打印指针变量的值，打印地址
格式控制符%@: 打印指针指向的对象
</code></pre></li>
<li><p>NSString对象的恒定性<br> 1). 当我们使用简要的创建字符串对象的时候，也就是使用OC字符串常量来初始化字符串指针的时候，这个字符串对象是存储在常量区的.</p>
<pre><code>NSString *str = @&quot;jack&quot;;
当我们调用NSString的类方法来创建对象的时候, 创建的对象是存储在堆区的.
NSString *str = [NSString stringWithFormat:@&quot;jack&quot;];
NSString *str = [NSString new];
</code></pre><p> 2). 恒定性</p>
<pre><code>当在内存中创建一个字符串对象后，这个字符串对象的内容就无法更改.
当我们重新为字符串指针初始化值的时候，并不是修改原来的字符串对象，而是重新的创建一个字符串对象，将这个字符串对象的地址重新赋值给字符串指针变量.
</code></pre><p> 3). 当系统准备要在内存中创建字符串对象的时候，会先检查内存中是否有相同内容的字符串对象，如果有直接指向，如果没有才会重新创建.</p>
<p> 4). 存储在常量区的数据不会被回收，所以存储在常量区的字符串也不会被回收.</p>
</li>
<li><p>NSString类中使用频率最高的方法<br> 1). 使用拼接的方式创建一个NSString对象</p>
<pre><code>+ (instancetype)stringWithFormat:(NSString *)format,...
</code></pre> <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">int age = 10;</span><br><span class="line">NSString *str = @&quot;jack&quot;;</span><br><span class="line">NSString *newStr = [NSString stringWithFormat:@&quot;大家好，我叫%@，今年%d岁&quot;,str,age];</span><br></pre></td></tr></table></figure>
<p> 2). 得到字符串的长度</p>
<pre><code>@property (readonly) NSUInteger length;
</code></pre> <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">NSString *str = @&quot;jack&quot;;</span><br><span class="line">NSUInteger len = str.length;</span><br></pre></td></tr></table></figure>
<p> 3). 得到字符串当中指定下标的字符</p>
<pre><code>- (unichar)characterAtIndex:(NSUInteger)index;
返回值是unichar类型的，要打印的话使用%C
</code></pre> <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">NSString *str = @&quot;jack&quot;;</span><br><span class="line">unichar ch = [str characterAtIndex:2];</span><br><span class="line">NSLog(@&quot;ch = %C&quot;, ch);</span><br></pre></td></tr></table></figure>
<p> 4). 判断两个字符串的内容是否相等</p>
<pre><code>a. 不能使用==来判断OC字符串的内容是否相同
b. == 运算符的作用: 比较左右两边的数据是否相同.
c. 所以如果我们要比较两个OC字符串的内容是否相同，不能使用==去比较.因为==比较的是字符串指针变量的值，而我们比较的是字符串的内容
- (BOOL)isEqualToString:(NSString *) aString;
可以比较字符串的内容
</code></pre> <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">NSString *str1 = @&quot;jack&quot;;</span><br><span class="line">NSString *str2 = @&quot;jack&quot;;</span><br><span class="line">[str1 isEqualToString:str2];</span><br></pre></td></tr></table></figure>
<p> 5). 将C语言的字符串转换为OC字符串</p>
<pre><code>+ (instancetype)stringWithUTF8String:(NSString *)string;
</code></pre> <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">char *str = &quot;jack&quot;;</span><br><span class="line">NSString *str1 = [NSString stringWithUTF8String: str];</span><br></pre></td></tr></table></figure>
<p> 6). 将OC字符串转换为C语言字符串</p>
<pre><code>@property (nullable, readonly) __strong const char *UTF8String;
</code></pre> <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">NSString *str = @&quot;jack&quot;;</span><br><span class="line">const char *str1 = str.UTF*String;</span><br></pre></td></tr></table></figure>
</li>
<li><p>字符串读写<br> 1). 将一个字符串写入到磁盘上的某一个文件</p>
<ul>
<li><p>(BOOL) writeToFile:(NSString *)path atomically:(BOOL)userAuxiliaryFile encoding:(NSStringEncoding)enc error:(NSError **)error;<br>参数1: 将字符串内容写入到哪一个文件之中，写上文件的路径.<br>参数2: YES，先将内容写入到一个临时文件，如果成功过再搬到指定的目录; NO,直接将内容写入到指定的文件，不安全，效率高<br>参数3: 指定写入的时候的编码.一般情况下使用UTF8. NSUTF8StringEncoding<br>参数4: 二级指针，要传递一个NSError指针的地址.如果写入成功，这个指针的值就是nil，如果失败，这个指针就会指向一个错误对象，这个对象描述了发生错误的信息. err.localizedDescription中存储发生错误的信息<br>返回值是BOOL类型，代表是否写入成功.</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">NSString *str = @&quot;jack&quot;;</span><br><span class="line">NSError *err;</span><br><span class="line">[str writeToFile:@&quot;/Users/Itcast/Desktop/abc.txt&quot;, atomically:NO encoding:NSUTF8StringEncoding error:&amp;err];</span><br></pre></td></tr></table></figure>
<p>2). 从磁盘文件读取内容</p>
</li>
</ul>
<ul>
<li><p>(instancetype) stringWithContentsOfFile:(NSString *)path encoding:(NSStringEncoding)enc error:(NSError **)error;<br>参数1：文件的路径<br>参数2：使用的编码NSUTF8StringEncoding<br>参数3：错误对象</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">NSError *err;</span><br><span class="line">[NSString stringWithContentsOfFile:@&quot;/Users/Itcast/Desktop/abc.txt&quot; encoding:NSUTF8StringEncoding error:&amp;err];</span><br></pre></td></tr></table></figure>
</li>
</ul>
</li>
<li><p>使用URL来读写字符串数据.<br> 1). 优势: 皆可以读取本地磁盘文件，还可以读写网页文件、ftp服务器文件<br> 2). 不同类型的URL地址的写法</p>
<pre><code>a. 本地磁盘文件: file://+路径----&gt;file:///Users/Itcast/Desktop/abc.txt
b. 网页地址: http://www.baidu.com/
c. ftp服务器文件的地址: ftp://server.itcast.cn/1.txt
</code></pre><ol start="3">
<li><p>将不同类型的地址封装在NSURL对象中<br> a. 从指定资源路径读取文本内容</p>
<ul>
<li>(nullable instancetype)stringWithContentsOfURL:(NSURL *)url encoding:(NSStringEncoding)enc error:(NSError **)error;<br>b. 将字符串的内容写入到资源路径中</li>
</ul>
<ul>
<li>(BOOL)writeToURL:(NSURL *)url atomically:(BOOL)useAuxiliaryFile encoding:(NSStringEncoding)enc error:(NSError **)error;<br>c. 如果要向网页或者ftp写内容要有权限.<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">NSURL *u1 = [NSURL URLWithString:@&quot;http://www.itcast.cn&quot;];</span><br><span class="line">NSString *str = [NSString stringWithContentsOfURL:u1 encoding:NSUTF8StringEncoding error:nil];</span><br></pre></td></tr></table></figure>
</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">NSURL *u1 = [NSURL URLWithString:@&quot;file:///Users/Itcast/Desktop/abc.txt&quot;];</span><br><span class="line">NSString *str = @&quot;hehehe&quot;;</span><br><span class="line">BOOL res = [str writeToURL:u1 atomically:NO encoding:NSUTF8StringEncoding error:nil];</span><br></pre></td></tr></table></figure>
</li>
</ol>
</li>
<li><p>字符串比较<br> 1). 不忽略大小写</p>
<ul>
<li><p>(NSComparisonResult)compare:(NSString *)string;</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">NSString *str1 = @&quot;hehehe&quot;;</span><br><span class="line">NSString *str2 = @&quot;jack&quot;;</span><br><span class="line">NSComparisonResult res = [str compare:str2];</span><br><span class="line">swith(res)&#123;</span><br><span class="line">	case NSOrderedAscending://str1小</span><br><span class="line">	break;</span><br><span class="line">	case NSOrderedSame://一样大</span><br><span class="line">	break;</span><br><span class="line">	case NSOrderedDescending://str2小</span><br><span class="line">	break;</span><br><span class="line">	default:</span><br><span class="line">	break;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>2). 忽略大小写</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line">	NSString *str1 = @&quot;hehehe&quot;;</span><br><span class="line">	NSString *str2 = @&quot;JACK&quot;;</span><br><span class="line"></span><br><span class="line">	NSComparisonResult res = [str compare:str2 option:NSCaseInsensitiveSearch];</span><br><span class="line">	swith(res)&#123;</span><br><span class="line">		case NSOrderedAscending://str1小</span><br><span class="line">		break;</span><br><span class="line">		case NSOrderedSame://一样大</span><br><span class="line">		break;</span><br><span class="line">		case NSOrderedDescending://str2小</span><br><span class="line">		break;</span><br><span class="line">		default:</span><br><span class="line">		break;</span><br><span class="line">	&#125;</span><br><span class="line">```	</span><br><span class="line">3). 比较字符串中的数字</span><br></pre></td></tr></table></figure>
<p>  NSString <em>str1 = @”hehehe001”;<br>  NSString </em>str2 = @”hehehe002”;</p>
<p>  NSComparisonResult res = [str compare:str2 option:NSNumericSearch];// 只能比格式固定的<br>  swith(res){</p>
<pre><code>case NSOrderedAscending://str1小
break;
case NSOrderedSame://一样大
break;
case NSOrderedDescending://str2小
break;
default:
break;
</code></pre><p>  }</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">4). 判断是否以某个字符串开头</span><br></pre></td></tr></table></figure>
<p>  NSString *str = @”<a href="http://www.baidu.com/&quot;" target="_blank" rel="noopener">http://www.baidu.com/&quot;</a>;<br>  BOOL res = [str hasPrefix:@”http://“];</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">5). 判断是否以某个字符串结束</span><br></pre></td></tr></table></figure>
<p>  NSString *str = @”/Users/Apple/Music/我们不一样.mp3”;<br>  BOOL res = [str hasSuffix:@”.mp3”];</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">8. 在主串中搜索子串</span><br><span class="line">	1). 从前往后</span><br><span class="line">		- (NSRange) rangeOfString:(NSString *)searchString;</span><br><span class="line">		返回值NSRange类型的结构体变量</span><br></pre></td></tr></table></figure>
<pre><code>typedef struct _NSRange{
    NSUInteger location;//代表子串在主串出现的下标
    NSUInteger length;//代表子串在主串中匹配的长度
} NSRange;
</code></pre>  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">	</span><br></pre></td></tr></table></figure>
<pre><code>NSString *str = @&quot;i love itcast!&quot;;
// 在str字符串中搜索@&quot;love&quot;出现的范围
NSRange range = [str rangeOfString:@&quot;love&quot;];
if(range.location==NSNotFound){
    // 没有找到
} else {
    // 找到了
}
或者
if(range.length==0){
    // 没有找到
} else {
    // 找到了
}
</code></pre>  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">2). 从后往前</span><br></pre></td></tr></table></figure>
<pre><code>NSString *str = @&quot;i love itcast love!&quot;;
// 在str字符串中搜索@&quot;love&quot;出现的范围
NSRange range = [str rangeOfString:@&quot;love&quot; options: NSBackwardsSearch]
</code></pre>  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">9. NSRange结构体</span><br><span class="line">	1). 是Foundation框架中定义的一个结构体</span><br></pre></td></tr></table></figure>
<pre><code>typedef struct _NSRange{
    NSUInteger location;//代表子串在主串出现的下标
    NSUInteger length;//代表子串在主串中匹配的长度
} NSRange;
</code></pre>  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">	NSRange range;</span><br><span class="line">	// 这个结构体变量一般情况下用来表示一段范围，特别用在子串在主串中的范围.</span><br><span class="line">2). 声明并初始化结构体变量的方式</span><br><span class="line">	a. 最原始的方式</span><br></pre></td></tr></table></figure>
<pre><code>    NSRange range;
    range.location = 3;
    range.length = 4;
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">		b. 第二种方式: NSRange range = &#123;3, 7&#125;;</span><br><span class="line">		c. 第三种方式: NSRange range = &#123;.location = 3, .length=7&#125;;</span><br><span class="line">		d. Foundation框架中定义了一个函数，这个函数可以快速的创建一个NSRange结构体.</span><br><span class="line">			NSMakeRange(loc, len);返回一个指定属性的NSRange结构体变量</span><br><span class="line">			NSRange range = NSMakeRange(3,7);</span><br><span class="line">		5. 可以将NSRange结构体变量转换为NSString.</span><br><span class="line">			NSRange range = NSMakeRange(3,7);</span><br><span class="line">			NSString *str = NSStringFromRange(range);</span><br><span class="line"></span><br><span class="line">10. 字符串截取</span><br><span class="line">	1). 取到字符串中的一部分</span><br><span class="line">	- (NSString *)substringFromIndex(NSUIntege)from;</span><br><span class="line">	从指定的下标处一直截取到最后</span><br></pre></td></tr></table></figure>
</code></pre><p>  NSString <em>str = @”背景连锁酒店分开计算懒死了”;<br>  NSString </em>newStr = [str substringFromIndex:3];</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">	2). 从第0个开始截取指定的个数</span><br><span class="line">	- (NSString *)substringToIndex(NSUIntege)to;</span><br><span class="line">	3). 从指定位置截取指定长度的字符串</span><br><span class="line">	- (NSString *)substringWithRange(NSRange)range;</span><br><span class="line"></span><br><span class="line">11. 字符串替换</span><br><span class="line">	1). </span><br><span class="line">	- (NSString *)stringByReplacingOccurrencesOfString:(NSString *)target withString:(NSString *)replacement;</span><br><span class="line">	将字符串中第一个参数替换为第二个参数，原来的指针指向的内容是不会变的，新串是以方法的返回值返回的.</span><br></pre></td></tr></table></figure>
<p>  NSString <em>str = @”背景连锁酒店分开计算懒死了”;<br>  NSString </em>newStr = [str stringByReplacingOccurrencesOfString:@”背景” withString:@”广州”];</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">12. 字符串数据转换为其他类型</span><br><span class="line">	@property (readonly)double doubleValue;</span><br><span class="line">	@property (readonly)float floatValue;</span><br><span class="line">	@property (readonly)int intValue;</span><br><span class="line">	@property (readonly)NSUINteger integerValue;</span><br><span class="line">	@property (readonly)long long longLongValue;</span><br><span class="line">	@property (readonly)BOOL boolValue;</span><br><span class="line"></span><br><span class="line">	转换注意:</span><br><span class="line"></span><br><span class="line">13. 其他</span><br><span class="line">	1). 去掉字符串前后的空格</span><br></pre></td></tr></table></figure>
<p>  NSString *str = @” Jack “;<br>  [str stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">2). 将字符串转换为大写或者小写</span><br></pre></td></tr></table></figure>
<p>  NSString *str = @” Jack “;<br>  [str uppercaseString];<br>  [str lowercaseString];</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">	</span><br><span class="line">二、</span><br><span class="line">1. NSMutableString</span><br><span class="line">	1). 是Foundation框架中的一个类，从NSString继承,是用来存储字符串数据的.</span><br><span class="line">	2). NSMutableString在父类NSString的基础之上做扩展,存储在NSMutableString对象中的数据具有可变性，不会新创建对象.</span><br><span class="line"></span><br><span class="line">2. NSMutableString的用法</span><br><span class="line">	1). 创建对象</span><br></pre></td></tr></table></figure>
<p>  NSMutableString *str = [NSMutableString string];<br>  [str appendString:@”jack”];</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">2). 往可变字符串对象中追加字符串</span><br><span class="line">- (void)appendString:(NSString *)aString;// 直接追加内容</span><br><span class="line">- (void)appendFormat:(NSString *)format...;// 以拼接的方式往可变字符串对象中追加内容</span><br><span class="line">3). 创建NSMutableString对象时，不能使用如下方式:</span><br></pre></td></tr></table></figure>
<p>  NSMutableString *str = @”jack”;</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line">	4). NSMutableString做大批量的字符串拼接，速度快，因为NSMutableString只有一个，每次修改的时候直接修改对象的内容</span><br><span class="line"></span><br><span class="line">3. 使用建议</span><br><span class="line">	1). 平时使用，还是使用NSString，因为效率高</span><br><span class="line">	2). 大批量的数据拼接的时候使用NSMutableString</span><br><span class="line">		10次以上使用NSMutableString.</span><br><span class="line"></span><br><span class="line">4. NSArray</span><br><span class="line">	1). 是Foundation框架中的一个类,用来存储多个数据，具备数组功能,所以NSArray是OC中的数组</span><br><span class="line">	2). 特点:</span><br><span class="line">		a. 只能存储OC对象</span><br><span class="line">		b. 长度固定,一旦NSArray数组创建完毕之后，元素的长度固定，无法新增、删除元素.</span><br><span class="line">		c. 每一个元素都是紧密相连的，每一个元素仍然有自己的下标.</span><br><span class="line">		d. 元素的类型是id类型的</span><br><span class="line">	3). NSArray数组的创建</span><br><span class="line">		1). 因为是一个类，所以就是创建NSArray对象.</span><br></pre></td></tr></table></figure>
<pre><code>NSArray *arr1 = [NSArray new];
NSArray *arr2 = [[NSArray alloc] init];
NSArray *arr3 = [NSArray array];
</code></pre>  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">这样创建出来的NSArray数组的元素的个数是0个，因为长度固定，所以没有任何意义.</span><br><span class="line">2). 创建数组的同时指定一个数组的元素，仍然没有意义</span><br></pre></td></tr></table></figure>
<pre><code>NSArray *arr1 = [NSArray arrayWithObject:@&quot;jack&quot;];
</code></pre>  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">3). 最常用创建NSArray数组的方式.</span><br><span class="line">+ (instancetype)arrayWithObjects:(ObjectType)firstObj,...</span><br></pre></td></tr></table></figure>
<pre><code>NSArray *arr1 = [NSArray arrayWithObjects:@&quot;jack&quot;,@&quot;rose&quot;,@&quot;lili&quot;,nil];
</code></pre>  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">		4). 创建NSArray简要方式</span><br><span class="line">			NSArray *arr = @[@&quot;jack&quot;, @&quot;rose&quot;, @&quot;lili&quot;];</span><br><span class="line">		5). 使用注意</span><br><span class="line">			a. 只能存储OC对象，不能存储非OC对象</span><br><span class="line">			b. 将元素写完之后，最后要写一个nil，表示元素到此结束了</span><br><span class="line"></span><br><span class="line">5. NSArray数组的编译</span><br><span class="line">	1). for循环</span><br><span class="line">	原理: 将下标挨个遍历出来</span><br></pre></td></tr></table></figure>
<p>  NSArray *arr = @[@”jack”,@”rose”];<br>  for(int i=0;i&lt;arr.count;i++){</p>
<pre><code>//NSLog(@&quot;%@&quot;,arr[i]);
NSLog(@&quot;%@&quot;, [arr objectAtIndex:i]);
</code></pre><p>  }</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">2). 使用增强for循环</span><br><span class="line">	a. 语法格式：</span><br><span class="line">		for(元素类型 变量名 in 数组名)&#123;</span><br><span class="line">			直接通过变量名拿到数组中的每一个元素</span><br><span class="line">		&#125;</span><br></pre></td></tr></table></figure>
<pre><code>NSArray *arr = @[@&quot;jack&quot;,@&quot;rose&quot;];
for(NSString *str in arr){
    NSLog(@&quot;%@&quot;, str);
}    
</code></pre>  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line">	b. 声明在for()中的变量叫做迭代变量</span><br><span class="line">	c. 执行变量</span><br><span class="line">		将数组中的第一个元素的值赋值给迭代变量，执行循环体</span><br><span class="line">		...</span><br><span class="line">		结束循环</span><br><span class="line">	d. 语法总结</span><br><span class="line">		-&gt; 迭代变量的类型和数组中的元素的类型保持一致</span><br><span class="line">		-&gt; 迭代变量的名称可以任意取</span><br><span class="line">		-&gt; in是固定的</span><br><span class="line">		-&gt; 遍历那个数组就将数组写在in后面</span><br><span class="line">		-&gt; 循环体里面，迭代变量的值就是元素的值</span><br><span class="line"></span><br><span class="line">	当NSArray数组中存储的数据类型不一致的时候，迭代变量的类型建议使用id类型</span><br><span class="line"></span><br><span class="line">3. 使用block遍历</span><br><span class="line">	- (void) enumerateObjectsUsingBlock:(void (^)OjbectType obj, NSUInteger idx, BOOL *stop))block;</span><br><span class="line">	这是一个方法，这个方法作用来遍历数组中的每一个元素</span><br></pre></td></tr></table></figure>
<pre><code>NSArray *arr = @[@&quot;jack&quot;,@&quot;rose&quot;];
// 将arr数组中的每一个元素遍历出来
[arr enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop){
    NSLog(@&quot;%@&quot;, obj);
    // 如果想停止循环，就将*stop设置为YES
}];    
</code></pre>  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">6. NSArray和NSString</span><br><span class="line">	1). 将数组中元素连接起来组成一个新的字符串</span><br><span class="line">	- (NSString *)componentsJoinedByString:(NSString *)separator</span><br><span class="line">	参数: 连接符</span><br></pre></td></tr></table></figure>
<p>  NSArray <em>arr = @[@”jack”, @”rose”, @”lili”];<br>  NSString </em>str = [arr componentsJoinedByString:@”#”];</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">2). 将字符串按指定分隔符分割</span><br></pre></td></tr></table></figure>
<p>  NSString <em>str = @”北京，昌平区，传智”;<br>  // 使用字符串进行分割<br>  NSArray </em>arr = [str componentsSeparatedByString:”，”];</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">7. NSMutableArray是NSArray的子类</span><br><span class="line">	1). NSMutableArray仍然是一个数组，就被NSArray的特点，只能存储OC对象，每一个元素是紧密相连的。</span><br><span class="line">	2). NSMutableArray相对于父类做的扩展，NSMutableArray数组的元素可以动态的新增和删除,其他用法与NSArray一致。</span><br><span class="line">	所以：</span><br><span class="line">		NSArray数组一旦创建，其元素的个数就固定，无法新增与删除</span><br><span class="line">		NSMutableArray数组，可以新增删除</span><br><span class="line">	3). NSMutableArray数组的创建</span><br></pre></td></tr></table></figure>
<pre><code>NSMutableArray *arr1 = [NSMutableArray new];
NSMutableArray *arr2 = [[NSMutableArray alloc] init];
NSMutableArray *arr3 = [NSMutableArray array];
</code></pre>  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">		这样创建出来的数组对象，数组的元素是0，但是有意义，可以动态的新增，删除.</span><br><span class="line">		最容易犯错:这样写不可以</span><br><span class="line">		NSMutableArray *arr1 = @[@&quot;jack&quot;, @&quot;rose&quot;, @&quot;lili&quot;];</span><br><span class="line"></span><br><span class="line">8. 新增与删除</span><br><span class="line">	1. 新增</span><br><span class="line">		a. // 将传入的参数作为数组的元素添加进去</span><br><span class="line">			- (void)addObject:(ObjectType)anObject;</span><br><span class="line">			// 将另外一个数组中的每一个元素添加到可变数组中</span><br><span class="line">			- (void)addObjectsFromArray:(NSArray&lt;ObjectType&gt; *)otherArray;</span><br></pre></td></tr></table></figure>
<pre><code>    NSMutableArray *arr1 = [NSMutableArray new];
    [arr1 addObject:@&quot;jack&quot;];
    NSArray *arr = @[@&quot;jack&quot;, @&quot;rose&quot;, @&quot;lili&quot;];
    [arr1 addObjectsFromArray:arr];
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">b. 在可变数组中指定的数组中插入一个元素</span><br><span class="line">	- (void)insertObject:(ObjectType)anObject atIndex:(NSUInteger)index;</span><br></pre></td></tr></table></figure>

    [arr insertObject:@&quot;lilei&quot;, anIndex:1];
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">2. 删除</span><br><span class="line">	a. 删除</span><br><span class="line">		// 删除指定下标的元素</span><br><span class="line">		- (void) removeObjectAtIndex:(NSUInteger)index;</span><br></pre></td></tr></table></figure>

    NSMutableArray *arr1 = [NSMutableArray new];
    [arr1 addObject:@&quot;jack&quot;];
    NSArray *arr = @[@&quot;jack&quot;, @&quot;rose&quot;, @&quot;lili&quot;];
    [arr1 addObjectsFromArray:arr];
    [arr removeObjectAtIndex:1];
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">b. 删除特定的元素</span><br><span class="line">	- (void)removeObject:(ObjectType)anObject;</span><br></pre></td></tr></table></figure>

    NSMutableArray *arr1 = [NSMutableArray new];
    [arr1 addObject:@&quot;jack&quot;];
    NSArray *arr = @[@&quot;jack&quot;, @&quot;rose&quot;, @&quot;lili&quot;];
    [arr1 addObjectsFromArray:arr];
    [arr removeObject:@&quot;lili&quot;];
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">c. 删除指定范围内的元素</span><br><span class="line">	- (void)removeObject:(ObjectType)anObject inRange:(NSRange)range;</span><br></pre></td></tr></table></figure>

    NSMutableArray *arr1 = [NSMutableArray new];
    [arr1 addObject:@&quot;jack&quot;];
    NSArray *arr = @[@&quot;jack&quot;, @&quot;rose&quot;, @&quot;lili&quot;];
    [arr1 addObjectsFromArray:arr];
    [arr removeObject:@&quot;lili&quot; inRange:NSMakeRange(0, 3)];            
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">d. 删除最后一个元素</span><br><span class="line">	- (void)removeLastObject;</span><br></pre></td></tr></table></figure>

    NSMutableArray *arr1 = [NSMutableArray new];
    [arr1 addObject:@&quot;jack&quot;];
    NSArray *arr = @[@&quot;jack&quot;, @&quot;rose&quot;, @&quot;lili&quot;];
    [arr1 addObjectsFromArray:arr];
    [arr removeLastObject];            
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">e. 删除所有</span><br><span class="line">	- (void)removeAllObjects;</span><br></pre></td></tr></table></figure>

    NSMutableArray *arr1 = [NSMutableArray new];
    [arr1 addObject:@&quot;jack&quot;];
    NSArray *arr = @[@&quot;jack&quot;, @&quot;rose&quot;, @&quot;lili&quot;];
    [arr1 addObjectsFromArray:arr];
    [arr removeAllObjects];            
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">9. NSNumber</span><br><span class="line">	1). 作用: 包装基本数据类型</span><br></pre></td></tr></table></figure>
</code></pre><p>  NSNumber <em>number = [NSNumber numberWithInt:10];<br>  等价于<br>  NSNumber </em>number = @10;<br><code>`</code></p>
</li>
</ul>
</li>
</ol>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/blog/2018/08/06/Object-C/Objective-C-学习第三天/" rel="next" title="Objective-C-学习第三天">
                <i class="fa fa-chevron-left"></i> Objective-C-学习第三天
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/blog/2018/08/06/Object-C/Objective-C-学习第二天/" rel="prev" title="Objective-C-学习第二天">
                Objective-C-学习第二天 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      

      <section class="site-overview-wrap sidebar-panel sidebar-panel-active">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="/blog/images/avatar.jpeg"
                alt="凌浩雨" />
            
              <p class="site-author-name" itemprop="name">凌浩雨</p>
              <p class="site-description motion-element" itemprop="description">专业从事于移动端开发，Android与iOS均有涉及，主做Android开发与React Native开发</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/blog/archives/">
              
                  <span class="site-state-item-count">393</span>
                  <span class="site-state-item-name">posts</span>
                </a>
              </div>
            

            

            

          </nav>

          

          

          
          

          
          

          

        </div>
      </section>

      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2018</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">凌浩雨</span>

  
</div>


  <div class="powered-by">Powered by <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a></div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">Theme &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Pisces</a> v5.1.4</div>




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/blog/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/blog/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/blog/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/blog/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/blog/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/blog/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/blog/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/blog/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  

  

  

</body>
</html>
